package ui.swing.button;

import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class HtmlButtons extends JFrame {

	private static final long serialVersionUID = -5748318961435318499L;

	public HtmlButtons() {
		super("HTML Buttons and Labels");
		setSize(400, 300);
		getContentPane().setLayout(new FlowLayout());
		String htmlText = "<html><p><font color=\"#800080\" "
				+ "size=\"4\" face=\"Verdana\">JButton</font> </p>"
				+ "<address><font size=\"2\"><em>"
				+ "with HTML text</em></font>" + "</address>";
		JButton btn = new JButton(htmlText);
		getContentPane().add(btn);

		htmlText = "<html><p><font color=\"#800080\" "
				+ "size=\"4\" face=\"Verdana\">JLabel</font> </p>"
				+ "<address><font size=\"2\"><em>"
				+ "with HTML text</em></font>" + "</address>";
		JLabel lbl = new JLabel(htmlText);
		getContentPane().add(lbl);

		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
	}
	
	public static void main(String[] args) {
		new HtmlButtons();
		//System.out.println(HtmlButtons.class.getResource("/1.txt").getFile());
		//System.out.println(HtmlButtons.class.getResource("2.txt").getFile());
	}
	
}